package com.yhb.myshop.commons.entity;

public class BaseResult {
    public static int SUCCESS_CODE=200;
    private String msg;
    private int code;
    private boolean success;

    public BaseResult(String msg,  boolean success) {
        this.msg = msg;
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
    public static BaseResult fail(String msg){
       BaseResult baseResult=new BaseResult(msg,false);
       return baseResult;
    }
    public static BaseResult success(){
       BaseResult baseResult=new BaseResult("success",true);
       return baseResult;
    }
}
